﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SQLCommandTransformer
{
    public sealed class Selections
    {
        /// <summary>
        /// 回车转|
        /// </summary>
        public readonly Selection CatridgeReturn2VerticalBar = new Selection("回车转|");

        /// <summary>
        /// C#文本代码转换成单行
        /// </summary>
        public readonly Selection ConvertCSharpCodeToSingleLine = new Selection("C#文本代码转换成单行");

        /// <summary>
        /// SQL命令转换成单行
        /// </summary>
        public readonly Selection ConvertSQLCommandsIntoSingleLines = new Selection("SQL命令转换成单行");

        /// <summary>
        /// 正则表达式转换为C#文本代码
        /// </summary>
        public readonly Selection RegularExpressionsConvertedToCSharpCode = new Selection("正则表达式转换为C#文本代码");

        /// <summary>
        /// 从PDF复制文字删除回车和空格（中文）
        /// </summary>
        public readonly Selection CopyTextFromPDFDeleteCarriageReturnsAndSpaces_CN = new Selection("从PDF复制文字删除回车和空格（中文）");

        /// <summary>
        /// 从PDF复制文字删除回车和空格（英文）
        /// </summary>
        public readonly Selection CopyTextFromPDFDeleteCarriageReturnsAndSpaces_EN = new Selection("从PDF复制文字删除回车和空格（英文）");

        /// <summary>
        /// 从Goolge翻译到变量名（首字母均大写）
        /// </summary>
        public readonly Selection GoolgeTranslateToVariableName_CapitalizeAllInitials = new Selection("从Goolge翻译到变量名（首字母均大写）");

        /// <summary>
        /// 从Goolge翻译到变量名（驼峰命名法）
        /// </summary>
        public readonly Selection GoolgeTranslateToVariableName_Camel = new Selection("从Goolge翻译到变量名（驼峰命名法）");

        /// <summary>
        /// 把中文字符替换为正常字符
        /// </summary>
        public readonly Selection CNLettersAndNumberToNormalLettersAndNumber = new Selection("把中文字符替换为正常字符");

        /// <summary>
        /// 转为LaTex正文文字
        /// </summary>
        public readonly Selection LaTeXStringRender_Paragraphs = new Selection("转为LaTex正文文字");

        /// <summary>
        /// 转为LaTex表格文字
        /// </summary>
        public readonly Selection LaTeXStringRender_Tables = new Selection("转为LaTex表格文字");

        /// <summary>
        /// 获取所有的displayed names。
        /// </summary>
        /// <returns></returns>
        public string[] GetAllDisplayedNames()
        {
            var properties = this.GetType().GetProperties();
            string[] res = new string[properties.Length];
            for (int i = 0; i < properties.Length; i++)
            {
                res[i] = properties[i].GetValue(properties[i], null).ToString();
            }

            return res;
        }
    }
}
